package messages;

import java.io.Serializable;

public class ServerParameters implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 10001111110000L;
	private String address;
	private int port;
	private int NumberOfClients = 0;
	private int RingNumber;

	public ServerParameters(String address, int port) {
		this.address = address;
		this.port = port; // maximum 2^16 - 1
	}

	public ServerParameters(String address, int port, int NumberOfClients) {
		this.address = address;
		this.port = port; // maximum 2^16 - 1
		this.NumberOfClients = NumberOfClients;
	}

	public String getAddress() {
		return address;
	}

	public int getPort() {
		return port;
	}

	public int getNumberOfClients() {
		return NumberOfClients;
	}

	public void setNumberOfClients(int numberOfClients) {
		NumberOfClients = numberOfClients;
	}

	public int getRingNumber() {
		return RingNumber;
	}

	public void setRingNumber(int ringNumber) {
		RingNumber = ringNumber;
	}

	public void incNumberOfClients() {
		NumberOfClients = NumberOfClients + 1;
	}

	public void decNumberOfClients() {
		NumberOfClients--;
	}
}